package com.excesys.exsecs.energy.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.excesys.exsecs.access.entity.AccessDeviceInfo;
import com.excesys.exsecs.common.core.util.R;
import com.excesys.exsecs.energy.entity.RegDev;
import com.excesys.exsecs.energy.vo.RegDevExcelVO;
import org.springframework.validation.BindingResult;

import java.text.ParseException;
import java.util.List;

public interface RegDevService extends IService<RegDev> {

    Page<RegDev> queryPage(Page page, RegDev regDev);

    List<RegDev> queryRegDevList(List<String> unitNos);

    List<AccessDeviceInfo> unRegisterDev(String devModel);

    boolean saveRegDev(List<RegDev> regDevs);


    R batchImport(List<RegDevExcelVO> excelVOList, BindingResult bindingResult);

    //能耗总量
    JSONObject powerSum(String date);

    //单位能耗
    JSONObject powerUnit(String date, Double area);

    //能耗趋势 - 分类
    JSONObject powerTrend(String startDate, String endDate, String energyType, String compareType) throws ParseException;

    //能耗趋势 - 综合能耗
    JSONObject powerIntegral(String startDate, String endDate, String compareType) throws ParseException;

    //能耗概览
    JSONObject powerOverview(String startDate, String endDate, String compareType);
}